﻿<!doctype html>
<html lang="zh-cn">
<head>
    <title>{if $titlepre}{$titlepre} -{/if} {$title} {$yb.site_title} - {$yb.site_titlepre}</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" media="screen" href="{$url}/tpl/image/css/collect.css"/>
	{include file="require_js.html"}
	</head>

<body>
	<h2 id="title">编辑杂志：{$board.boardname}</h2>
	<form id="edit-board-form" action="{spUrl c=admin a=edit_magazine_do}" method="post">
		<input type="hidden" name="formKey" >
		<div class="input_container">
			<div class="board_name" ><label for="blogName">杂志名字:</label></div>
			<input class="board_name_input" type="text" id="MagName" name="MagName" value="{$board.boardname}">
			<input type="hidden" name="Uid" value="{$board.uid}">
			<input type="hidden" name="boid" value="{$board.boid}">
		</div>
	</form>
	{literal}
	<script>
		(function () {
		var parent = art.dialog.parent,// 父页面window对象
			api = art.dialog.open.api,//art.dialog.open扩展方法
			$ = function (id) {return document.getElementById(id)},
			form = $('edit-board-form'),
			magname = $('MagName');
		if (!api) return;
		parent.document.title = '编辑杂志';
		// 操作对话框
		api.title('系统登录')
			// 自定义按钮
			.button(
				{
					name: '修改',
					callback: function () {
						if (check(MagName) form.submit();
						return false;
					},
					focus: true
				},
				{
					name: '取消'
				}
			);
		// 表单验证
		var check = function (input) {
			if (input.value === '') {
				inputError(input);
				input.focus();
				return false;
			} else {
				return true;
			};
		};
		window.onload = function () {setTimeout(function () {username.focus()}, 240);};
		})();
		</script>
		{/literal}
	</div>
</body>